/******************************************************************************
 *      Mestrado em Ciência da Computação - UFMS
 *		Redes de Computadores - Prof. Dr. Ronaldo Alves Ferreira
 *		Alunos: Geraldo Landre, Marcel Tolentino, Vinícius Bueno
 *****************************************************************************/
 
#include "config.h"

void init_config()
{    
    copy_string(&(configure.port),PORT);
    copy_string(&(configure.server_dir),SERVER_DIR);
    copy_string(&(configure.cgi_dir),CGI_DIR);
    copy_string(&(configure.cache_dir),CACHE_DIR);

    configure.threads = THREADS;
    configure.cache_size_l1 = CACHE_SIZE_L1;
    configure.cache_size_l2 = CACHE_SIZE_L2;    
}

void print_config()
{
    printf("______________Config______________\n");
    printf("port: '%s'\n",configure.port->pt);
    printf("threads: '%i'\n",configure.threads);
    printf("file_default: '%s'\n",configure.file_default->pt);
    printf("server_dir: '%s'\n",configure.server_dir->pt);
    printf("cgi_dir: '%s'\n",configure.cgi_dir->pt);
    printf("cache_dir: '%s'\n",configure.cache_dir->pt);
    printf("cache_size_l1: '%i'\n",configure.cache_size_l1);
    printf("cache_size_l2: '%i'\n",configure.cache_size_l2);
    printf("__________________________________\n\n");
}